@istest(SeeAllData=true)
public class Test_DNC_Account {

         static testMethod void AccountTest() {
         test.starttest();
         Schema.DescribeSObjectResult d = Schema.SObjectType.Account;
    Map<String,Schema.RecordTypeInfo> rtMapByName = d.getRecordTypeInfosByName();
    Schema.RecordTypeInfo rtByName =  rtMapByName.get('West - Student Account');
    String RecTypeId  = rtByName.getRecordTypeId();
         List<Account> lst_Account = new List<Account>();
            Account Acc = new Account();
            acc.LastName = 'Test001';
            acc.FirstName = 'Unit';
            Acc.recordtypeId=RecTypeId  ;
            Acc.Work_Phone__pc='3434';
            Acc.PersonHomePhone='3233232';
            Acc.PersonMobilePhone='232323';
            Acc.Marketing_Phone__pc='32323';
            Acc.Other_Phone_2__pc='32323';
            Acc.PersonOtherPhone='3232323';
            Acc.Mother_s_Phone__pc='3232323';
            Acc.Father_s_Phone__pc='23232323';
            Acc.Work_Phone_Preferences__pc = 'DNC';
            Acc.Other_Phone_2_Preferences__pc = 'DNC';
            Acc.Other_Phone_Preferences__pc = 'DNC';
            Acc.Marketing_Phone_Preferences__pc = 'DNC';
            Acc.Father_s_Phone_Preferences__pc = 'DNC';
            Acc.Mother_s_Phone_Preferences__pc = 'DNC';
            Acc.Mobile_Phone_Preferences__pc = 'DNC';
            Acc.Home_Phone_Preferences__pc = 'DNC';
            Acc.Work_Email_Preferences__pc = 'opt Out';
            Acc.Other_Email_2_Preferences__pc = 'opt Out';
            Acc.Other_Email_Preferences__pc = 'opt Out';
            Acc.Marketing_Email_Preferences__pc = 'opt Out';
            Acc.Father_s_Email_Preferences__pc = 'opt Out';
            Acc.Mother_s_Email_Preferences__pc = 'opt Out';
            Acc.University_Email_Preferences__pc = 'DNC';
            Acc.Personal_Email_Preferences__pc = 'opt Out';
            lst_Account.add(Acc);
            Account Ac = new Account();
            ac.LastName = 'Test002';
            ac.FirstName = 'Unit';
            Ac.recordtypeId=RecTypeId  ;
            Ac.Work_Phone__pc='3434';
            Ac.PersonHomePhone='3233232';
            Ac.PersonMobilePhone='232323';
            Ac.Marketing_Phone__pc='32323';
            Ac.Other_Phone_2__pc='32323';
            Ac.PersonOtherPhone='3232323';
            Ac.Mother_s_Phone__pc='3232323';
            Ac.Father_s_Phone__pc='23232323';
            
            lst_Account.add(Ac);
            Insert lst_Account;
            try
            {
                Account Acct = [ Select Id, LastName,FirstName,recordtypeId,Work_Phone__pc,PersonHomePhone,PersonMobilePhone,Marketing_Phone__pc,Other_Phone_2__pc,PersonOtherPhone,Mother_s_Phone__pc, Father_s_Phone__pc,Work_Phone_Preferences__pc,Other_Phone_2_Preferences__pc,Other_Phone_Preferences__pc,Marketing_Phone_Preferences__pc,Father_s_Phone_Preferences__pc,Mother_s_Phone_Preferences__pc,Mobile_Phone_Preferences__pc,Home_Phone_Preferences__pc,Work_Email_Preferences__pc,Other_Email_2_Preferences__pc,Other_Email_Preferences__pc,Marketing_Email_Preferences__pc,Father_s_Email_Preferences__pc,Mother_s_Email_Preferences__pc,University_Email_Preferences__pc,Personal_Email_Preferences__pc from Account where lastName='Test001' limit 1];
                Acct.Work_Phone_Preferences__pc = '';
                Acct.Other_Phone_2_Preferences__pc = '';
                Acct.Other_Phone_Preferences__pc = '';
                Acct.Marketing_Phone_Preferences__pc = '';
                Acct.Father_s_Phone_Preferences__pc = '';
                Acct.Mother_s_Phone_Preferences__pc = '';
                Acct.Mobile_Phone_Preferences__pc = '';
                Acct.Home_Phone_Preferences__pc = '';
                Acct.Work_Email_Preferences__pc = '';
                Acct.Other_Email_2_Preferences__pc = '';
                Acct.Other_Email_Preferences__pc = '';
                Acct.Marketing_Email_Preferences__pc = '';
                Acct.Father_s_Email_Preferences__pc = '';
                Acct.Mother_s_Email_Preferences__pc = '';
                Acct.University_Email_Preferences__pc = '';
                Acct.Personal_Email_Preferences__pc = '';
                update Acct;
            }
            catch(Exception ex){}
            
            try
            {
                Account Acct = [ Select Id, LastName,FirstName,recordtypeId,Work_Phone__pc,PersonHomePhone,PersonMobilePhone,Marketing_Phone__pc,Other_Phone_2__pc,PersonOtherPhone,Mother_s_Phone__pc, Father_s_Phone__pc,Work_Phone_Preferences__pc,Other_Phone_2_Preferences__pc,Other_Phone_Preferences__pc,Marketing_Phone_Preferences__pc,Father_s_Phone_Preferences__pc,Mother_s_Phone_Preferences__pc,Mobile_Phone_Preferences__pc,Home_Phone_Preferences__pc,Work_Email_Preferences__pc,Other_Email_2_Preferences__pc,Other_Email_Preferences__pc,Marketing_Email_Preferences__pc,Father_s_Email_Preferences__pc,Mother_s_Email_Preferences__pc,University_Email_Preferences__pc,Personal_Email_Preferences__pc from Account where lastName='Test002' limit 1];
                Acc.Work_Phone_Preferences__pc = 'DNC';
            Acc.Other_Phone_2_Preferences__pc = 'DNC';
            Acc.Other_Phone_Preferences__pc = 'DNC';
            Acc.Marketing_Phone_Preferences__pc = 'DNC';
            Acc.Father_s_Phone_Preferences__pc = 'DNC';
            Acc.Mother_s_Phone_Preferences__pc = 'DNC';
            Acc.Mobile_Phone_Preferences__pc = 'DNC';
            Acc.Home_Phone_Preferences__pc = 'DNC';
            Acc.Work_Email_Preferences__pc = 'opt Out';
            Acc.Other_Email_2_Preferences__pc = 'opt Out';
            Acc.Other_Email_Preferences__pc = 'opt Out';
            Acc.Marketing_Email_Preferences__pc = 'opt Out';
            Acc.Father_s_Email_Preferences__pc = 'opt Out';
            Acc.Mother_s_Email_Preferences__pc = 'opt Out';
            Acc.University_Email_Preferences__pc = 'opt Out';
            Acc.Personal_Email_Preferences__pc = 'opt Out';
                update Acct;
            }
            catch(Exception ex){}
        test.stoptest();    
    }
}